import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'

Vue.use(Router)

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'login',
    //   component: login,
    //   meta: {allowBack: false}
    // },
     {path: '/', name: 'index', meta: {allowBack: false}, component: resolve => require(['../components/Mysql.vue'], resolve),
      children: [
//第二种 直接生命在路由里
        {path: '/banner', name: 'banner', component: resolve => require(['../components/banner.vue'], resolve)},
        {path: '/project', name: 'project', component: resolve => require(['../components/project.vue'], resolve)},
        {path: '/op_project_details', name: 'op_project_details', component: resolve => require(['../components/op_project_details.vue'], resolve)},
        {path: '/areaOperation', name: 'areaOperation', component: resolve => require(['../components/areaOperation.vue'], resolve)},
        {path: '/banner_edit', name: 'banner_edit', component: resolve => require(['../components/banner_edit.vue'], resolve)},
        {path: '/project_add', name: 'project_add', component: resolve => require(['../components/project_add.vue'], resolve)},
        {path: '/banner_details', name: 'banner_details', component: resolve => require(['../components/banner_details.vue'], resolve)},
        {path: '/project_details', name: 'project_details', component: resolve => require(['../components/project_details.vue'], resolve)},
      ]
    },
  ]
})
